package com.gxa.dr2.controller;

import com.gxa.dr2.dto.ResultDTO;
import com.gxa.dr2.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("role")
public class RoleController {



    @Autowired
    private RoleService roleService;


    /**
     * 所有的角色数据
     * @return
     */
    @PostMapping("list/all")
    @ResponseBody
    public ResultDTO listAll(){
        return roleService.allData();
    }


}
